package com.boliq.lol.ui.news;

import android.view.View;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.boliq.lol.R;
import com.boliq.lol.adapter.NewsArticleAdapter1;
import com.boliq.lol.base.BaseFragment;
import com.boliq.lol.bean.NewsArticleBean1;


public class NewsArticleFragment1 extends BaseFragment {

    private RecyclerView mRecyclerView;
    private NewsArticleAdapter1 mAdapter;

    @Override
    protected int rootLayout() {
        return R.layout.item_news_article1;
    }

    @Override
    protected void initView(View view) {
        mRecyclerView = view.findViewById(R.id.rv_menu_list1);
    }

    @Override
    protected void initData() {
        NewsArticleBean1 nb1=new NewsArticleBean1("[天神裁决天使] 4裁决4天神2宗师",R.drawable.icon_1,"虎牙EDC");
        NewsArticleBean1 nb2=new NewsArticleBean1("[重装拉夫] 4重装3龙魂3战神",R.drawable.icon_4,"斗鱼梨落秋夕");
        NewsArticleBean1 nb3=new NewsArticleBean1("[七法龙王] 7法师3龙魂3森林",R.drawable.icon_5,"斗鱼EDC");

        mAdapter = new NewsArticleAdapter1();
        mAdapter.addData(nb1);
        mAdapter.addData(nb2);
        mAdapter.addData(nb3);


    }

    @Override
    protected void bindData() {
        super.bindData();
        mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
        mRecyclerView.setAdapter(mAdapter);

    }

    @Override
    protected void bindEvent() {

    }
}
